package com.jxk.jsonproject.entity;

import com.alibaba.fastjson.annotation.JSONField;
import lombok.AllArgsConstructor;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;
@Data
@AllArgsConstructor
public class Person  implements Serializable {
    @JSONField(name="AGE", serialize=false)
    private int age;
    @JSONField(name="LAST NAME", ordinal = 2)
    private String lastName;
    @JSONField(name="FIRST NAME", ordinal = 1)
    private String fullName;

    @JSONField(name="DATE OF BIRTH", format = "YYYY-MM-dd",ordinal = 3)
    private Date dateOfBirth;

    public Person(int age, String fullName, Date dateOfBirth) {
        super();
        this.age = age;
        this.fullName= fullName;
        this.dateOfBirth = dateOfBirth;
    }
}
